package com.example.g7640.util;

import org.apache.tomcat.util.security.MD5Encoder;
import sun.security.provider.MD5;

/**
 * 密码处理
 */
public class PasswordUtil {

    public static final String DEFAULT_SALT = "SGVsbG93b3JsZA_";


    public static String encodePassword(String clearTextPassword){
        String tmp = DEFAULT_SALT + clearTextPassword;
        String password = MD5Util.strToMD5(tmp);
        return password;
    }

}
